<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <title>For Bug 26150 - Negative values for animation-delay are ignored</title>
  <style type="text/css">
    .square {
      background: blue;
      width: 20px;
      height: 20px;
      position: absolute;
      animation-duration: 10s;
      animation-iteration-count: 1;
      animation-timing-function: linear;
    }

    .move {
      animation-name: square-move;
    }

    .translate {
      animation-name: square-translate;
    }

    @keyframes square-move {
      0%    { left: 0px; }
      100%  { left: 3000px; }
    }

    @keyframes square-translate {
      0%    { transform: translateX(0); }
      100%  { transform: translateX(3000px); }
    }

    #square1 {
      top: 20px;
      left: 20px;
      animation-delay: -1s;
    }

    #square2 {
      top: 60px;
      left: 20px;
    }

    #square3 {
      top: 100px;
      left: 20px;
      animation-delay: -1s;
    }

    #square4 {
      top: 140px;
      left: 20px;
    }
  </style>

  <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>

  <script>
    // The delay of square1 is negative so square1 should be in ahead of square2.
    const expectedValues = [
      // [time, element-id, property, expected-value, tolerance]
      [0, "square1", "left", 300, 0],
      [0, "square2", "left", 0, 0],
      [0.5, "square1", "left", 450, 0],
      [0.5, "square2", "left", 150, 0],
      [0, "square3", "transform.4", 300, 0],
      [0, "square4", "transform.4", 0, 0],
      [0.5, "square3", "transform.4", 450, 0],
      [0.5, "square4", "transform.4", 150, 0],
    ];

    runAnimationTest(expectedValues);
  </script>
</head>

<body>

<div class="square move" id="square1"></div>
<div class="square move" id="square2"></div>
<div class="square translate" id="square3"></div>
<div class="square translate" id="square4"></div>

<div id="result">
</div>

</body>
</html>
